package com.ericzong.renamer.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public abstract class AbstractDataSet implements DataSet
{
	private List<Record> records = new ArrayList<>();

	@Override
	public Record get(int index)
	{
		return records.get(index);
	}

	@Override
	public void remove(int index)
	{
		records.remove(index);
	}

	@Override
	public void add(Record record)
	{
		records.add(record);
	}

	@Override
	public boolean remove(Record record)
	{
		return records.remove(record);
	}

	@Override
	public void clear()
	{
		records.clear();
	}

	@Override
	public int size()
	{
		return records.size();
	}

	@Override
	public Iterator<Record> iterator()
	{
		return records.iterator();
	}

}
